$('#footer').load('../../directive/footer.html', function() {
    var img  = $('#footer .weui-tabbar a').eq(0).find('img')
    img.attr('src', img.attr('src').replace('normal', 'hover'))
    img.parent().addClass('weui-bar__item_on')
})

$.ajax({
    url: '/api/config/config_detail',
    data: {},
    type:'post',
    dataType:'json',
    success: function (res) {
        $('#name').text('欢迎来到' + res.object.name)
        $('.connect .cono').text(res.object.connect_name_1 + ': ' + res.object.connect_phone_1)
        $('.connect .cont').text(res.object.connect_name_2 + ': ' + res.object.connect_phone_2)
        $('.address p').text(res.object.address)
    }
})

$.ajax({
    url: '/api/config/query_content',
    data: {},
    type:'post',
    dataType:'json',
    success: function (res) {
        res.data.forEach(function(content, index) {
            var c = $('#model section').clone()
            c.find('h3').text(index + 1 + '.' + content.name)
            c.find('.word').text(content.remark)
            content.img.split(',').forEach(function (img, ind) {
                var i = c.find('img').clone()
                $(i).attr('src', res.object.domin + img).appendTo($(c).find('.img'))
            })
            c.appendTo($('.content_'))
        })
    }
})